/*****************************************************************************
*        描述 :
*             文件描述
*        CLR版本:            3.5
*        创建者 :            蒋 光
*        个人域名:           jiangguang.net.cn
*        命名空间名称:       ECP.Model
*        文件名:             BaseLogEntity.cs
*        创建系统时间:       2012/11/2 19:07:02
*        创建年份:           2012
*
/*****************************************************************************/

namespace ECP.Model
{
    using System;
    using System.Data;
    using ECP.Utilities;

    [Serializable]
    public class BaseLogEntity
    {
        private string createDate = string.Empty;
        private string description = string.Empty;
        private string id = string.Empty;
        private string ipAddress = string.Empty;
        private string methodName = string.Empty;
        private string parameters = string.Empty;
        private string processID = string.Empty;
        private string processName = string.Empty;
        private string userID = string.Empty;
        private string userRealName = string.Empty;

        public void ClearProperty()
        {
            this.ProcessID = string.Empty;
            this.ProcessName = string.Empty;
            this.MethodName = string.Empty;
            this.Parameters = string.Empty;
            this.UserID = string.Empty;
            this.UserRealName = string.Empty;
            this.IPAddress = string.Empty;
        }

        public BaseLogEntity GetFrom(DataRow dataRow)
        {
            this.ID = BaseBusinessLogic.ConvertToString(dataRow[BaseLogTable.FieldID]);
            this.ProcessID = BaseBusinessLogic.ConvertToString(dataRow[BaseLogTable.FieldProcessID]);
            this.ProcessName = BaseBusinessLogic.ConvertToString(dataRow[BaseLogTable.FieldProcessName]);
            this.MethodName = BaseBusinessLogic.ConvertToString(dataRow[BaseLogTable.FieldMethodName]);
            this.Parameters = BaseBusinessLogic.ConvertToString(dataRow[BaseLogTable.FieldParameters]);
            this.IPAddress = BaseBusinessLogic.ConvertToString(dataRow[BaseLogTable.FieldIPAddress]);
            this.UserID = BaseBusinessLogic.ConvertToString(dataRow[BaseLogTable.FieldUserID]);
            this.UserRealName = BaseBusinessLogic.ConvertToString(dataRow[BaseLogTable.FieldUserRealName]);
            this.Description = BaseBusinessLogic.ConvertToString(dataRow[BaseLogTable.FieldDescription]);
            this.CreateDate = BaseBusinessLogic.ConvertToString(dataRow[BaseLogTable.FieldCreateDate]);
            return this;
        }

        public string CreateDate
        {
            get
            {
                return this.createDate;
            }
            set
            {
                this.createDate = value;
            }
        }

        public string Description
        {
            get
            {
                return this.description;
            }
            set
            {
                this.description = value;
            }
        }

        public string ID
        {
            get
            {
                return this.id;
            }
            set
            {
                this.id = value;
            }
        }

        public string IPAddress
        {
            get
            {
                return this.ipAddress;
            }
            set
            {
                this.ipAddress = value;
            }
        }

        public string MethodName
        {
            get
            {
                return this.methodName;
            }
            set
            {
                this.methodName = value;
            }
        }

        public string Parameters
        {
            get
            {
                return this.parameters;
            }
            set
            {
                this.parameters = value;
            }
        }

        public string ProcessID
        {
            get
            {
                return this.processID;
            }
            set
            {
                this.processID = value;
            }
        }

        public string ProcessName
        {
            get
            {
                return this.processName;
            }
            set
            {
                this.processName = value;
            }
        }

        public string UserID
        {
            get
            {
                return this.userID;
            }
            set
            {
                this.userID = value;
            }
        }

        public string UserRealName
        {
            get
            {
                return this.userRealName;
            }
            set
            {
                this.userRealName = value;
            }
        }
    }
}